package spring.superrun.record.mvc.backendcomputecenter;

import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import redis.clients.jedis.JedisCluster;
import redis.clients.jedis.JedisClusterConnectionHandler;
import spring.superrun.record.mvc.di.SpringUtil;
import spring.superrun.record.mvc.entity.SuperrunRecordranking;
import spring.superrun.record.mvc.service.SuperrunRecordrankingService;
import spring.superrun.record.mvc.service.SuperrunRunrecordsService;
import spring.superrun.record.mvc.setup.RedisConfig;

import javax.annotation.Resource;

@Configuration //1.主要用于标记配置类，兼备Component的效果。
@EnableScheduling // 2.开启定时任务
public class RecordRankingCompute {
    /**
     * 计划任务间隔2秒
     */
    @Scheduled(fixedDelay =1000 )
    private void ConfigureTakes(){
        //运行消费者
        RedisListingConsumer  redisConsumer = new RedisListingConsumer();
        //redisConsumer.run();
    }
}
